package cn.jilian.dao;

import java.util.Collection;
import java.util.List;

import org.springframework.data.repository.CrudRepository;

import cn.jilian.entity.Mace;

public interface MaceDAO extends CrudRepository<Mace, Long> {

	void deleteByFid(long fid);
	
	void deleteByUid(long uid);
	
	void deleteByUidIn(Collection<Long> uids);
	
	List<Mace> findByUidInAndRank(Collection<Long> uids,Integer rank);
	
	List<Mace> findByUidAndRank(Long uid,Integer rank);
	
	List<Mace> findByUidAndFidIn(Long uid,Collection<Long> fids);
	
	void deleteByUidAndFidIn(Long uid,Collection<Long> fids);
	
	Mace findByFidAndUid(long fid,long uid);
}
